#include "fepch.h"
#include "Buffer.h"

#include "Renderer.h"

#include "FysicsEngine/Platform/OpenGL/OpenGLBuffer.h"

namespace Fysics {

	VertexBuffer* VertexBuffer::Create(float* vertices, uint32_t size)
	{
		switch (Renderer::GetAPI())
		{
		case RendererAPI::API::None:;// FE_CORE_ASSERT(false, "...");
			case  RendererAPI::API::OpenGL: return new OpenGLVertexBuffer(vertices, size);
		}
		//FE_CORE_ASSERT(false, "Unknow RendererAPI!");
		return nullptr;
	}

	IndexBuffer* IndexBuffer::Create(uint32_t* indices, uint32_t size)
	{
		switch (Renderer::GetAPI())
		{
		case RendererAPI::API::None:;//FE_CORE_ASSERT(false, "...");
		case  RendererAPI::API::OpenGL: return new OpenGLIndexBuffer(indices, size);
		}
		//FE_CORE_ASSERT(false, "Unknow RendererAPI!");
		return nullptr;
	}
}